﻿using Microsoft.AspNetCore.Http;

namespace XLZF.MicroServices.Models;

public class UploadFiles
{
    public long chunkNumber { get; set; }

    public long chunkSize { get; set; }

    public long currentChunkSize { get; set; }

    public long totalSize { get; set; }

    public string? identifier { get; set; }

    public string? filename { get; set; }

    public string? relativePath { get; set; }

    public int totalChunks { get; set; }

    //public string? type { get; set; }

    //public string? create_time { get; set; }

    public IFormFile? file { get; set; }

    public string page { get; set; }
}


public class file
{
    public List<chunks> chunks { get; set; }
}

public class chunks
{
    public byte[] bytes { get; set; }
}

public class AddFileEntity
{
    public int chunkNumber { get; set; }

    public int chunkSize { get; set; }

    public int currentChunkSize { get; set; }

    public int totalSize { get; set; }

    public string? identifier { get; set; }

    public string? filename { get; set; }

    public string? relativePath { get; set; }

    public string? totalChunks { get; set; }

    public byte[]? contents { get; set; }
}

public class ResultModel
{
    /// <summary>
    /// 是否合并 1 合并 0 不合并
    /// </summary>
    public int needMerge { get; set; }

    /// <summary>
    /// 需要合并的文件夹名称
    /// </summary>
    public string DirName { get; set; }

    /// <summary>
    /// 合并后的文件位置
    /// </summary>
    public string FileName { get; set; }
}